<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <title>Document</title>
    <style>
        .loader{
            float:left;
            position:absolute;
            top: 50%;
            left: 50%;
            height: 58px; margin-top: -29px;
            width: 232px;
            margin-left: -120px;
            z-index:2
        }
    </style>

</head>
<body>


<div id="tab" class="loader">
    hello
</div>




    <script src="../jquery-1.9.1/jquery.min.js"></script>

    <script>
        function optionLoader(open,msg){
            var dom='<div class="loader  white middle" id="load" style="line-height:30px; background-color:#000000;padding-top:8px; padding-left:20px; border-radius:5px">'+
                ' <h4 class="">gggg<i class="ace-icon fa fa-spinner fa-spin orange bigger-125">ggg</i>&nbsp; &nbsp;'+ msg+ '</h4> </div>';
            if(open){
                $('body').append(dom);
            }
            else{
                $('#load').remove();
            }
        }

        optionLoader(true,'正在提交信息...');
        optionLoader(false);

    </script>
</body>
</html>